package com.getpebble.android.common.version;

import com.getpebble.android.common.core.util.ObjectUtil;
import com.getpebble.android.common.model.FirmwareVersion;
import com.google.common.primitives.UnsignedInteger;

public class FirmwareVersionInfo {
    private FirmwareVersion mFirmwareVersion;
    private String mGitCommit;
    private UnsignedInteger mHardwarePlatform;
    private boolean mIsRecovery;
    private UnsignedInteger mMetadataVersion;
    private long mTimestamp;

    public FirmwareVersionInfo setTimestamp(long timestamp) {
        this.mTimestamp = timestamp;
        return this;
    }

    public FirmwareVersionInfo setFirmwareVersion(FirmwareVersion firmwareVersion) {
        this.mFirmwareVersion = firmwareVersion;
        return this;
    }

    public FirmwareVersionInfo setGitCommit(String gitCommit) {
        this.mGitCommit = gitCommit;
        return this;
    }

    public FirmwareVersionInfo setIsRecovery(boolean isRecovery) {
        this.mIsRecovery = isRecovery;
        return this;
    }

    public FirmwareVersionInfo setHardwarePlatform(UnsignedInteger hardwarePlatform) {
        this.mHardwarePlatform = hardwarePlatform;
        return this;
    }

    public FirmwareVersionInfo setMetadataVersion(UnsignedInteger metadataVersion) {
        this.mMetadataVersion = metadataVersion;
        return this;
    }

    public long getTimestamp() {
        return this.mTimestamp;
    }

    public FirmwareVersion getFirmwareVersion() {
        return this.mFirmwareVersion;
    }

    public String getGitCommit() {
        return this.mGitCommit;
    }

    public boolean isRecovery() {
        return this.mIsRecovery;
    }

    public UnsignedInteger getHardwarePlatform() {
        return this.mHardwarePlatform;
    }

    public UnsignedInteger getMetadataVersion() {
        return this.mMetadataVersion;
    }

    public boolean equals(Object o) {
        boolean z = true;
        if (o == null) {
            return false;
        }
        if (o == this) {
            return true;
        }
        if (!(o instanceof FirmwareVersionInfo)) {
            return false;
        }
        FirmwareVersionInfo other = (FirmwareVersionInfo) o;
        if (!(other.getTimestamp() == getTimestamp() && ObjectUtil.nullCheckEquals(other.getFirmwareVersion(), getFirmwareVersion()) && ObjectUtil.nullCheckEquals(other.getGitCommit(), getGitCommit()) && other.isRecovery() == isRecovery() && ObjectUtil.nullCheckEquals(other.getHardwarePlatform(), getHardwarePlatform()) && ObjectUtil.nullCheckEquals(other.getMetadataVersion(), getMetadataVersion()))) {
            z = false;
        }
        return z;
    }

    public int hashCode() {
        return ((((((((((Long.valueOf(getTimestamp()).hashCode() + 355) * 71) + getFirmwareVersion().hashCode()) * 71) + getGitCommit().hashCode()) * 71) + Boolean.valueOf(isRecovery()).hashCode()) * 71) + getHardwarePlatform().hashCode()) * 71) + getMetadataVersion().hashCode();
    }
}
